package cn.net.vote.test;

import cn.net.vote.util.JestUtil;
import io.searchbox.client.JestClient;

import java.io.IOException;

public class count {
    public static void main(String[] args) throws IOException {
        JestClient jestClient = JestUtil.getJestClient();
        try {
            //批量导入数据到ES（参数1：索引名称；参数2：索引类型名称；参数3：拼装好的数据）
            JestUtil.serachAll(jestClient,"广东深圳","t_index10","t_user10");
        } catch (Exception e) {
            e.printStackTrace();
        }
        //关闭连接
        jestClient.close();
    }
}
